import React from 'react'
import { Context } from './App'

export default function Child() {
  return (
    <Context.Consumer>
      {(value) => (
        <div>
          <p>Child: {value.count}</p>
          <button onClick={value.changeCount}>修改</button>
        </div>
      )}
    </Context.Consumer>
  )
}
